Rem
File:	TIdSystem.bmx
History:
	-4.09.10 Created By Maximilian Micko

(c)Rainbow Productions
Part of the Rainbow-Enging(R)
End Rem

Type tIdSystem
	Field fRegistered:TMap
	
	Method New()
		fRegistered = New TMap
	End Method
	
	Method Register:String(Obj:Object)
		If (Not MapContains(fRegistered, obj.ToString()))
			MapInsert(fRegistered, obj.ToString(), obj)
			Return obj.ToString()
		Else
			Return False
		EndIf
	End Method
	
	Method Get:Object(id:String)
		Local obj:Object = MapValueForKey(fRegistered, id)
		If (obj)
			Return Obj
		Else
			Return Null
		endif
	End Method
End Type
